package cn.funnyxb.powerremember.uis.task.done;

import android.content.Context;
import cn.funnyxb.tools.appFrame.debugTool.Debuger;
import cn.funnyxb.tools.appFrame.util.net.NetHelper;
import cn.funnyxb.tools.appFrame.util.net.exceptions.Exception_ActiveConnectionIsNotAvailable;
import cn.funnyxb.tools.appFrame.util.net.exceptions.Exception_CannotGetConnectionSource;
import cn.funnyxb.tools.appFrame.util.net.exceptions.Exception_ResponseCodeIsNot200;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXException;

public class Webservices
{
  static final String SERVER_SENTENCE_ELEMENTNAME = "string";
  static final String SERVER_SENTENCE_KEY = "wordKey";
  static final String SERVER_SENTENCE_URL = "http://fy.webxml.com.cn/webservices/EnglishChinese.asmx/TranslatorSentenceString";

  public static InputStream getSentenceInputStream(Context paramContext, String paramString)
    throws ParserConfigurationException, MalformedURLException, IOException, Exception_CannotGetConnectionSource, Exception_ActiveConnectionIsNotAvailable, Exception_ResponseCodeIsNot200
  {
    String str = "http://fy.webxml.com.cn/webservices/EnglishChinese.asmx/TranslatorSentenceString?wordKey=" + paramString;
    return new NetHelper(paramContext).getInputStream(str, 500, 500);
  }

  public static ArrayList<String> getSentences(Context paramContext, String paramString)
  {
    ArrayList localArrayList1;
    try
    {
      ArrayList localArrayList2 = getSentences(getSentenceInputStream(paramContext, paramString), "");
      localArrayList1 = localArrayList2;
      return localArrayList1;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
      localArrayList1 = null;
    }
  }

  public static ArrayList<String> getSentences(InputStream paramInputStream, String paramString)
    throws ParserConfigurationException, SAXException, FactoryConfigurationError, IOException
  {
    if (paramInputStream == null);
    ArrayList localArrayList;
    for (Object localObject = null; ; localObject = localArrayList)
    {
      return localObject;
      localArrayList = new ArrayList();
      SAXParserFactory.newInstance().newSAXParser().parse(paramInputStream, new 1(localArrayList));
    }
  }

  private static void log(String paramString)
  {
    Debuger.log("webservice", paramString);
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.powerremember.uis.task.done.Webservices
 * JD-Core Version:    0.5.3
 */